//
//  BCReadyOrderTitleCollectionViewCell.m
//  BangcaiSale
//
//  Created by Liang Zhang on 16/7/9.
//  Copyright © 2016年 Bangcai. All rights reserved.
//

#import "BCReadyOrderTitleCollectionViewCell.h"

@implementation BCReadyOrderTitleCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    NSMutableAttributedString *waitTitleAttributedString = [[NSMutableAttributedString alloc] initWithString:self.sendTimeDistanceLable.text];
    UIColor *textColor_blue = [UIColor colorWithRed:0.255 green:0.518 blue:0.984 alpha:1.000];
    NSString *titleString = @"距离发货时间：";
    [waitTitleAttributedString addAttribute:NSForegroundColorAttributeName  //文字颜色
                                      value:[UIColor darkGrayColor]
                                      range:NSMakeRange(0, titleString.length)];
    [waitTitleAttributedString addAttribute:NSForegroundColorAttributeName  //文字颜色
                                      value:textColor_blue
                                      range:NSMakeRange(titleString.length, (self.sendTimeDistanceLable.text.length-titleString.length))];
    self.sendTimeDistanceLable.attributedText = waitTitleAttributedString;

}

+ (instancetype)cellWithCollectionView:(UICollectionView *)collectionView {
    static NSString *ID = @"ReadyOrderTitleCellIdentifer";
    UINib *nib = [UINib nibWithNibName:@"BCReadyOrderTitleCollectionViewCell" bundle: [NSBundle mainBundle]];
    [collectionView registerNib:nib forCellWithReuseIdentifier:ID];
    BCReadyOrderTitleCollectionViewCell *cell = [[BCReadyOrderTitleCollectionViewCell alloc] init];
    return cell;
}

@end
